<template>
	<view>
		<view class="forum">

			<view class="under">

				<view class="card">
					<forumCard></forumCard>
				</view>

				<uni-fab ref="fab" horizontal='right' vertical='bottom' @fabClick="to()" />
			</view>

		</view>
	</view>
</template>

<script>
	import forumCard from '@/pages/forum/components/forum-card.vue'
	import store from '@/store/index.js'
	import {
		mapState,
		mapMutations,
		mapActions,
		mapGetters
	} from 'vuex'
	export default {
		components: {
			forumCard
		},
		onShow() {
			this.getForumData()
		},
		data() {
			return {

			}
		},
		methods: {
			...mapMutations('course', ['getForumData']),
			to() {
				// uni.switchTab({url: '/pages/index/index'})
				uni.navigateTo({
					url: '/pages/forum/forum-add/forum-add'
				})
			},
			detail(item) {
				console.log(item)
			}
		}
	}
</script>

<style scoped lang="scss">
	.top {
		height: 10vw;
		display: flex;
		flex-direction: row;
		justify-content: space-between;

		view {
			width: 50%;
			height: 10vw;
			border: 1rpx solid black;
		}
	}

	.card {
		margin-bottom: 10rpx;
		// background-color: blanchedalmond;
	}
</style>